package org.geektimes.projects.user.logging;

import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;

public class UserWebLoggingConfiguration {
    public UserWebLoggingConfiguration() throws Exception {
        System.out.println("UserWebLoggingConfiguration");
        // 通过代码的方式调整日志级别
        Logger logger = Logger.getLogger("org.geektimes");
        ConsoleHandler consoleHandler = new ConsoleHandler();
        consoleHandler.setEncoding("UTF-8");
        consoleHandler.setLevel(Level.WARNING);
        logger.addHandler(consoleHandler);
    }


}
